#include "screen.h"

void screen::getScreenFromList(const list<Shape*> &shape_list)//transfers the container to its graphic state in a matrix.
{
	list<Shape*>::const_iterator itr = shape_list.begin();

	while(itr != shape_list.end() )
	{
		(*itr)->drawToBuffer(*this);
		++itr;
	}
}

void screen::initScr()//initializes the screen to spaces.
{
	for(int i=0; i <= 79; i++)
			for(int j=0; j <= 24; j++)
				scr[j][i] = ' ';
}

void screen::printScrToScreen()const //prints the intire martrix onto the screen.
{
	for(int i=0; i < s_height; i++)
		for(int j=0; j < s_width; j++)
				cout << scr[i][j];
}